<script>
addEventListener("unload", function() {
    parent.frameUnloaded();
}, true);
</script>
